Bass Growl Module for Nullsoft Signal Processing Studio (Winamp 5)
   Pieced together by Rob Grace based on other people's code:

   "octave down" code is Copyright (C) 2004 - Cockos Incorporated www.cockos.com 
   Delay code from justin 
   Hi/lo pass filters based on algorithms submitted by Patrice Tarrabia on musicdsp.org

Aug. 16, 2004

Here's a first-cut at an interesting bass enhancement module, based on a concept used by a rack-mounted device a friend demonstrated to me in the late 80's and that is probably still used by some recording studios.  It basically creates a bass harmonic one octave lower than the source, and then mixes it in with the source to reinforce and enhance the "punch" of the music.  I'm not sure if there's a name for this effect, or what the name of the device was (anyone?)  But the effect works great for enhancing anemic 80s music, jazz, or any music that needs more "thump". 

The "octave down" module supplied with Winamp 5's Signal Processing Studio provides the basis for this effect.  Listening to the module by itself gives a basic feel to how the bass enhancement effect will sound.  It uses a moving sampler window to halve the frequencies without slowing down the music. This in itself is a fun novelty, but listening to your favorite artist on tranquilizers gets old quickly.

The additional step needed to make it useful is to keep the source material for all but the lowest registers, and mix in only the lowest bass parts of this half-frequency signal.  Low-pass and high-pass filters accomplish this.  But the remaining problem is that we need to select a sampling window for the half-freq algorithm that passes through low frequencies, whose wavelength is as long as 50 ms (1/20Hz).  If we choose a 100ms window, the output of the half-frequency algorithm is delayed by a varying amount up to 100ms, since the moving sampler of the "octave down" algorithm catches the waveforms at different points in the window.  If we just mixed in its output with the source, it would make the bass enhancement effect sound muddy.  So we add in a delay to the original source (sent through a hi-pass filter) to move it more in line with the delayed bass effect.  It still isn't perfect, but at least the maximum difference is now halved to 50 ms or less, which is hard to discern for low bass frequencies.

The high-pass filter on the original source material is needed, since low frequencies in the original signal can obscure the deeper bass coming out of the effect module.  Partly a psychoacoustic effect and partly because the deeper bass can null out the original bass waveform at different points.  Using an adjustable high-pass filter with a gentle, 6dB slope allows the deeper bass to come through without muting out the mid-bass parts of the original signal.

So the stages of the module are:
- Create a delayed version of the original source
- Pass the original source through the octave-down algorithm
- Pass the output of octave-down through the low-pass filter
- Pass the delayed source through the high-pass filter
- Mix together the outputs of the low-pass and high-pass filters
- Pass result through a simple gain to prevent clipping of the output

The sliders will take a bit of playing around to get the sound that you want. Here are some hints:

lo-pass
-------
Center frequency of the low-pass filter, in 20Hz tic increments.  This is the freq. at which the deeper bass rolls off to allow the original source to come through.  High settings and you'll start hearing a phantom vocalist/solo instrument alongside the source (a neat effect for certain types of music, e.g. Dave Brubeck arrangements or Michael Jackson's yelps ;-)).  But you'll probably want to keep this at 5 or below for most music.  This setting is highly dependent on the speaker / headphones you use.  Frequencies below 60Hz won't be heard on your boom box or cheap headphones - they will only distort the speaker drivers.  Lower frequency settings really need a good pair of headphones or a subwoofer (tread carefully - there's no subsonic filter on this module!)  I recommend the Koss Plug or Shure E2c headphones if you're looking for a portable set with good deep bass response.

bass Q
------
This is the low-pass filter slope (bass Q, or resonance).  At the minimum value, the low pass filter will just slowly drop off around the selected frequency.  Higher values of this slider will boost the bass around the selected lo-pass frequency before it drops off below, and the "bell curve" gets narrower with higher values.  There's a simple gain to compensate for the peaking effect.  I've found that a value around .8 is good for deeper bass frequencies around 20-50 Hz to add real punch, while lower values (0-0.5) are better for higher lo-pass frequencies to avoid boominess or to make the deep bass effect more subtle.

hi pass
-------
Frequency of the high-pass filter on the original source signal, in 50Hz tic increments.  You can try setting this to 0, allowing most of the original deep bass from the source signal to come through.  But I'd suggest moving the slider to 2 tics or above, as this will allow the deeper bass to come through more clearly.

level
-----
Simple gain - move down from 100% if you hear clipping.


I'm a novice at both DSP and audio processing, so any comments and suggestions for improvements are welcome at rmg2768@yahoo.com.  At some point, I'll get this effect working on a standalone plug-in DLL that will work with any Winamp.

DISCLAIMER:  Use at your own risk - Not responsible for fried headphones or woofers, annoyed neighbors or broken glass!